﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeEllipCone : OdGeSurface
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeEllipCone(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeEllipCone_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeEllipCone obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeEllipCone()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeEllipCone(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeEllipCone() : this(GlobalsPINVOKE.new_OdGeEllipCone__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeEllipCone(OdGeEllipCone arg0) : this(GlobalsPINVOKE.new_OdGeEllipCone__SWIG_1(OdGeEllipCone.getCPtr(arg0)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeEllipCone(double cosineAngle, double sineAngle, OdGePoint3d origin, double minorRadius, double majorRadius, OdGeVector3d axisOfSymmetry) : this(GlobalsPINVOKE.new_OdGeEllipCone__SWIG_2(cosineAngle, sineAngle, OdGePoint3d.getCPtr(origin), minorRadius, majorRadius, OdGeVector3d.getCPtr(axisOfSymmetry)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeEllipCone(double cosineAngle, double sineAngle, OdGePoint3d baseOrigin, double minorRadius, double majorRadius, OdGeVector3d axisOfSymmetry, OdGeVector3d majorAxis, OdGeInterval height, double startAng, double endAng) : this(GlobalsPINVOKE.new_OdGeEllipCone__SWIG_3(cosineAngle, sineAngle, OdGePoint3d.getCPtr(baseOrigin), minorRadius, majorRadius, OdGeVector3d.getCPtr(axisOfSymmetry), OdGeVector3d.getCPtr(majorAxis), OdGeInterval.getCPtr(height), startAng, endAng), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double radiusRatio()
		{
			double result = GlobalsPINVOKE.OdGeEllipCone_radiusRatio(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double minorRadius()
		{
			double result = GlobalsPINVOKE.OdGeEllipCone_minorRadius(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double majorRadius()
		{
			double result = GlobalsPINVOKE.OdGeEllipCone_majorRadius(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d baseCenter()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeEllipCone_baseCenter(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getAngles(out double startAng, out double endAng)
		{
			GlobalsPINVOKE.OdGeEllipCone_getAngles(this.swigCPtr, out startAng, out endAng);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double halfAngle()
		{
			double result = GlobalsPINVOKE.OdGeEllipCone_halfAngle(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getHalfAngle(out double cosineAngle, out double sineAngle)
		{
			GlobalsPINVOKE.OdGeEllipCone_getHalfAngle(this.swigCPtr, out cosineAngle, out sineAngle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getHeight(OdGeInterval height)
		{
			GlobalsPINVOKE.OdGeEllipCone_getHeight(this.swigCPtr, OdGeInterval.getCPtr(height));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double heightAt(double u)
		{
			double result = GlobalsPINVOKE.OdGeEllipCone_heightAt(this.swigCPtr, u);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d axisOfSymmetry()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeEllipCone_axisOfSymmetry(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d majorAxis()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeEllipCone_majorAxis(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d minorAxis()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeEllipCone_minorAxis(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d apex()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeEllipCone_apex(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isClosed(OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeEllipCone_isClosed__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isClosed()
		{
			bool result = GlobalsPINVOKE.OdGeEllipCone_isClosed__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isOuterNormal()
		{
			bool result = GlobalsPINVOKE.OdGeEllipCone_isOuterNormal(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCone setMinorRadius(double minorRadius)
		{
			OdGeEllipCone result = new OdGeEllipCone(GlobalsPINVOKE.OdGeEllipCone_setMinorRadius(this.swigCPtr, minorRadius), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCone setMajorRadius(double majorRadius)
		{
			OdGeEllipCone result = new OdGeEllipCone(GlobalsPINVOKE.OdGeEllipCone_setMajorRadius(this.swigCPtr, majorRadius), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCone setAngles(double startAng, double endAng)
		{
			OdGeEllipCone result = new OdGeEllipCone(GlobalsPINVOKE.OdGeEllipCone_setAngles(this.swigCPtr, startAng, endAng), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCone setHeight(OdGeInterval height)
		{
			OdGeEllipCone result = new OdGeEllipCone(GlobalsPINVOKE.OdGeEllipCone_setHeight(this.swigCPtr, OdGeInterval.getCPtr(height)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCone set(double cosineAngle, double sineAngle, OdGePoint3d center, double minorRadius, double majorRadius, OdGeVector3d axisOfSymmetry)
		{
			OdGeEllipCone result = new OdGeEllipCone(GlobalsPINVOKE.OdGeEllipCone_set__SWIG_0(this.swigCPtr, cosineAngle, sineAngle, OdGePoint3d.getCPtr(center), minorRadius, majorRadius, OdGeVector3d.getCPtr(axisOfSymmetry)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCone set(double cosineAngle, double sineAngle, OdGePoint3d center, double minorRadius, double majorRadius, OdGeVector3d axisOfSymmetry, OdGeVector3d majorAxis, OdGeInterval height, double startAng, double endAng)
		{
			OdGeEllipCone result = new OdGeEllipCone(GlobalsPINVOKE.OdGeEllipCone_set__SWIG_1(this.swigCPtr, cosineAngle, sineAngle, OdGePoint3d.getCPtr(center), minorRadius, majorRadius, OdGeVector3d.getCPtr(axisOfSymmetry), OdGeVector3d.getCPtr(majorAxis), OdGeInterval.getCPtr(height), startAng, endAng), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCone Assign(OdGeEllipCone arg0)
		{
			OdGeEllipCone result = new OdGeEllipCone(GlobalsPINVOKE.OdGeEllipCone_Assign(this.swigCPtr, OdGeEllipCone.getCPtr(arg0)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
